#include "typedefs.hpp"

unsigned Typedef::add(string str) {
	if(members.find(str) != members.end()) {
		return members.find(str)->second;
	}
	unsigned value = members.size();
	members[str] = value;
	return value;
}

unsigned Typedef::get(string str) {
	if(members.find(str) != members.end()) {
		return members.find(str)->second;
	} else {
		throw(ERROR_MEMBERS);
	}
}
